<template>
  <el-carousel :interval="2000" type="card" height="200px">
    <el-carousel-item v-for="item in list" :key="item.id">
      <img :src="item.img" class="img" />
      <h3 class="medium">{{ item.text }}</h3>
    </el-carousel-item>
  </el-carousel>
</template>

<script>
export default {
  data() {
    return {
      list: [
        {
          text: "18812012818",
          id: 1,
          type: "phone",
          img: require("./phone.png"),
        },
        { text: "2730699323", id: 2, type: "QQ", img: require("./QQ.png") },
        {
          text: "swa2637552676",
          id: 3,
          type: "wechat",
          img: require("./Wechat.png"),
        },
      ],
    };
  },
};
</script>

<style scoped>
.el-carousel__item h3 {
  position: relative;
  font-family: "华文行楷";
  padding-left: 30px;
  background-image: linear-gradient(to right, rgb(250, 6, 250), rgb(233, 218, 5));
  -webkit-background-clip: text;
  color: transparent;
  font-size: 26px;
  /* line-height: 200px; */
  margin: 0;
  z-index: 1;
}

.el-carousel__item:nth-child(2n) {
  background-color: #f7f8f8;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.img {
  position: absolute;

  width: 100%;
  z-index: -1;
}
</style>